home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / exec / freesignal.c < prev    next >
C/C++ Source or Header  |  1996-10-24  |  1KB  |  73 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: freesignal.c,v 1.5 1996/10/24 15:50:50 aros Exp $
  4.     $Log: freesignal.c,v $
  5.     Revision 1.5  1996/10/24 15:50:50  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.4  1996/08/13 13:56:02  digulla
  9.     Replaced AROS_LA by AROS_LHA
  10.     Replaced some AROS_LH*I by AROS_LH*
  11.     Sorted and added includes
  12.  
  13.     Revision 1.3  1996/08/01 17:41:12  digulla
  14.     Added standard header for all files
  15.  
  16.     Desc:
  17.     Lang: english
  18. */
  19. #include <exec/execbase.h>
  20. #include <exec/tasks.h>
  21. #include <aros/libcall.h>
  22.  
  23. /*****************************************************************************
  24.  
  25.     NAME */
  26.     #include <clib/exec_protos.h>
  27.  
  28.     AROS_LH1(void, FreeSignal,
  29.  
  30. /*  SYNOPSIS */
  31.     AROS_LHA(LONG, signalNum, D0),
  32.  
  33. /*  LOCATION */
  34.     struct ExecBase *, SysBase, 56, Exec)
  35.  
  36. /*  FUNCTION
  37.     Free a signal allocated with AllocSignal().
  38.  
  39.     INPUTS
  40.     signalNum - Number of the signal to free or -1 to do nothing.
  41.  
  42.     RESULT
  43.  
  44.     NOTES
  45.  
  46.     EXAMPLE
  47.  
  48.     BUGS
  49.  
  50.     SEE ALSO
  51.     AllocSignal(), Signal(), Wait()
  52.  
  53.     INTERNALS
  54.  
  55.     HISTORY
  56.  
  57. ******************************************************************************/
  58. {
  59.     AROS_LIBFUNC_INIT
  60.  
  61.     if(signalNum!=-1)
  62.     {
  63.     /* Nobody guarantees that the compiler will make it atomic. */
  64.     Forbid();
  65.  
  66.     /* Clear the bit */
  67.     SysBase->ThisTask->tc_SigAlloc&=~(1<<signalNum);
  68.     Permit();
  69.     }
  70.     AROS_LIBFUNC_EXIT
  71. }
  72.  
  73.